import Vue from 'vue'
import Router from 'vue-router'




Vue.use(Router)

export default new Router({
  routes: [

    { path: '/login', component: resolve => require(['@/components/Login'], resolve) },
    {
      path: '/', name: 'main', component: resolve => require(['@/components/Container'], resolve)
    },
    {
      path: '/main', name: 'main', component: resolve => require(['@/components/Container'], resolve)
    },
    {
      path: '/maintaindatillist', name: 'maintaindatillist', component: resolve => require(['@/components/maintain/MaintainDatilList'], resolve)
    },
  
    {
      path: '/404',
      component: resolve => require(['@/components/404'], resolve)
    },
    {
      path: '/',
      component: resolve => require(['@/components/Container'], resolve),
      children: [
        {
          path: '/addgoodsmode', name: 'addgoodsmode', component: resolve => require(['@/components/goods/AddGoods'], resolve)
        },
        {
          path: '/password', name: 'test', component: resolve => require(['@/components/password/password'], resolve)
        },
        {
          path: '/test', name: 'test', component: resolve => require(['@/components/Test'], resolve)
        },
        {
          path: '/addgoods', name: 'addgoods', component: resolve => require(['@/components/goods/AddGoods'], resolve)
        },
        {
          path: '/maintenance', name: 'maintenance', component: resolve => require(['@/components/maintenance/maintenance'], resolve)
        },
        {
          path: '/maintainlist', name: 'maintainlist', component: resolve => require(['@/components/maintain/MaintainList'], resolve)
        },
        {
          path: '/goodslist', name: 'goodslist', component: resolve => require(['@/components/goods/GoodsList'], resolve)
        },
        {
          path: '/orderindex', name: 'orderindex', component: resolve => require(['@/components/order/OrderIndex'], resolve)
        },
        {
          path: '/accountindex', name: 'accountindex', component: resolve => require(['@/components/order/accountindex'], resolve)
        },
        {
          path: '/userindex', name: 'userindex', component: resolve => require(['@/components/user/UserIndex'], resolve)
        },
        {
          path: '/merchantindex', name: 'merchantindex', component: resolve => require(['@/components/merchant/MerchantIndex'], resolve)
        },
        {
          path: '/usermemberprice', name: 'usermemberprice', component: resolve => require(['@/components/user/UserMemberprice'], resolve)
        },
        {
          path: '/transcation', name: 'transcation', component: resolve => require(['@/components/transcation/Transcation'], resolve)
        },   
        {
          path: '/roledetail', name: 'transcation', component: resolve => require(['@/components/system/RoleDetail'], resolve)
        },
        {
          path: '/sysuser', name: 'transcation', component: resolve => require(['@/components/system/SysUser'], resolve)
        },
        // 修理工审核
        {
          path: '/repairIndex', name: 'repairIndex', component: resolve => require(['@/components/repair/index'], resolve)
        },
        // 施工数据
        {
          path: '/construction', name: 'construction', component: resolve => require(['@/components/construction/index'], resolve)
        }
      ]
    },
    {
      path: '*',
      redirect: { path: '/404' }
    }
  ]
})
